package io.xxx.xbutler.config;

import com.hy.corecode.idgen.WFGIdGenerator;
import com.hy.properties.IdGeneratorOptions;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class IdGeneratorConfig {

    @Bean
    public WFGIdGenerator idGenerator() {
        IdGeneratorOptions idGeneratorOptions = new IdGeneratorOptions();
        idGeneratorOptions.setWorkerId((short) 6);
        idGeneratorOptions.setWorkerIdBitLength((byte) 3);
        return new WFGIdGenerator(idGeneratorOptions);
    }
}
